package ooday02test;

public class Teacher extends Person{
    public String salary;

    //构造方法
    public Teacher() {
    }

    public Teacher(String name, int age, String address, String salary) {
        super(name, age, address);
        this.salary = salary;
    }
    //重写方法
    public void sayHi(){
        System.out.println("我是老师，我的名字叫"+name+"，今年"+age+"岁了，住在"+address+"，我的薪水是"+salary);
    }
    //特有方法
    public void teach(){
        System.out.println(name+"老师教课");
    }
}
